package datastore.db.exception;

/*
 * The datastore and its API impose several restrictions on names for entity properties and model instance attributes.

The datastore reserves all property names that begin and end with two underscores (__*__). A datastore entity cannot have a property with such a name.

The Python model API ignores all attributes on a Model or Expando that begin with an underscore (_). Your application can use these attributes to associate data with the model objects that is not saved to the datastore.

Lastly, the Python model API uses object attributes to define properties of a model, and by default the datastore entity properties are named after the attributes. Because the Model class has several properties and methods for other purposes, those attributes cannot be used for properties in the Python API. For example, a Model cannot have a property accessed with the attribute key.

However, a property can specify a different name for the datastore than the attribute name by giving a name argument to the property constructor. This allows the datastore entity to have a property name similar to a reserved attribute in the Model class, and use a different attribute name in the class.

class MyModel(db.Model):
  obj_key = db.StringProperty(name="key")

The following attribute names are reserved by the Model class in the Python API:

    * all
    * app
    * copy
    * delete
    * entity
    * entity_type
    * fields
    * from_entity
    * get
    * gql
    * instance_properties

	

    * is_saved
    * key
    * key_name
    * kind
    * parent
    * parent_key
    * properties
    * put
    * setdefault
    * to_xml
    * update

 */
public class ReservedWordError extends RuntimeException {
    private static final long serialVersionUID = -2139957777853989920L;

}
